# 单行注释
"""
多行注释
"""
print("hello world")
print(type(1))
a = 1.45
print(type(a))
print(round(1.45, 1))

import math

print(math.ceil(1.45))
print(math.floor(1.45))

print(type(True))

print("hello" + "world")
print("hello" * 3)

str = "hello"
print(str[-1:-6:-1])

a = 1
b = 1
c = 257
d = 257
print(id(a), id(b))
print(id(c), id(d))

print(type([]))
list = [1, 2, 3]
for i in list:
    print(i)

for index, value in enumerate(list):
    print(index, value)

print("====" * 12)
for i in range(len(list)):
    print(list[i])

print("====" * 12)
list.append(4)
list.extend([5, 6])
list.insert(1, 10)
print(list)

item = list.pop(1)
print(item)

list.remove(1)
list.append(2)
print(list.count(2))

list.clear()

print("====" * 12)
tuple = ()
print(type(tuple))

print("====" * 12)
s = "helloworld"
print(s.islower())
print(s.isupper())
print(s.count("o"))
print(s.strip())
print(s.split(' '))
print(s.find("e", 2))
print("#".join(["hello", "world"]))
print(s.isdigit())
print(s.isalpha())
print(s.isalnum())
print(s.isascii())

print("====" * 24)
d = {"name": "张三", "age": 18}
for i in d:
    print(i, d[i])

d = {"name": "张三", "age": 18}
for k, v in d.items():
    print(k, v)


def f1(*args):
    for i in args:
        print(i)


f1(1, 2, 3)
f1(*[1, 2, 3])


def f2(**kwargs):
    print(kwargs)


def f3(*args, **kwargs):
    print(args, kwargs)


f2(**{"name": "张三"})
f3(1, 2, **{"name": "张三"})

list = [1, 2, 3, 4]
for e in map(lambda x: x * 2, list):
    print(e)

from functools import reduce

print(reduce(lambda x, y: x + y, list))

for e in filter(lambda x: x % 2, list):
    print(e)

import my_modules

print(my_modules.sum(1, 2))
